#ifndef CDALRECORD_H
#define CDALRECORD_H

#include <map>

struct sqlite3_stmt;

class CDalRecord
{
  public:
    CDalRecord();

    explicit CDalRecord(sqlite3_stmt *stmt);

    virtual ~CDalRecord();

    void prepareRecord(sqlite3_stmt *stmt);

    bool readNext();

    int getRowCount();

    int getColumnNumber(const char *field);

    int getInt(const char *field);

    double getDouble(const char *field);

    const unsigned char* getString(const char *field);

    CDalRecord* operator=(sqlite3_stmt *stmt);

  protected:


  private:
    int rowCount;

    sqlite3_stmt *pStatement;

    std::map <std::string, int> mColumnNumber;
};

#endif // CDALRECORD_H
